<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pepr3D: pepr3d::FontRasterizer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pepr3d_icon.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pepr3D
   &#160;<span id="projectnumber">v1.0</span>
   </div>
   <div id="projectbrief">Pepr3D is a 3D graphics editor designed for FDM printing</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpepr3d_1_1_font_rasterizer.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classpepr3d_1_1_font_rasterizer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">pepr3d::FontRasterizer Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Used for triangulating a font outline.  
 <a href="classpepr3d_1_1_font_rasterizer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_font_rasterizer_8h_source.html">FontRasterizer.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpepr3d_1_1_font_rasterizer_1_1_tri.html">Tri</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7099a831f003a1e9f15e3d28918613b7"><td class="memItemLeft" align="right" valign="top"><a id="a7099a831f003a1e9f15e3d28918613b7"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>FontRasterizer</b> (const std::string fontFile)</td></tr>
<tr class="separator:a7099a831f003a1e9f15e3d28918613b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbb4bdd3f6183bebe44bc4bd38321b4d"><td class="memItemLeft" align="right" valign="top"><a id="acbb4bdd3f6183bebe44bc4bd38321b4d"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>getCurrentFont</b> () const</td></tr>
<tr class="separator:acbb4bdd3f6183bebe44bc4bd38321b4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a965167ef18771ff5b19f1bcfbb0403e0"><td class="memItemLeft" align="right" valign="top"><a id="a965167ef18771ff5b19f1bcfbb0403e0"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isValid</b> () const</td></tr>
<tr class="separator:a965167ef18771ff5b19f1bcfbb0403e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5632080c9dd7163ca8b3635820083148"><td class="memItemLeft" align="right" valign="top"><a id="a5632080c9dd7163ca8b3635820083148"></a>
std::vector&lt; std::vector&lt; <a class="el" href="structpepr3d_1_1_font_rasterizer_1_1_tri.html">FontRasterizer::Tri</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>rasterizeText</b> (const std::string textString, const size_t fontHeight, const size_t bezierSteps)</td></tr>
<tr class="separator:a5632080c9dd7163ca8b3635820083148"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a478acb4e2249fe8f6d548e7c850196af"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_font_rasterizer.html#a478acb4e2249fe8f6d548e7c850196af">addOneCharacter</a> (const char ch, const size_t bezierSteps, double offset, std::vector&lt; <a class="el" href="structpepr3d_1_1_font_rasterizer_1_1_tri.html">Tri</a> &gt; &amp;outTriangles)</td></tr>
<tr class="memdesc:a478acb4e2249fe8f6d548e7c850196af"><td class="mdescLeft">&#160;</td><td class="mdescRight">The following code originated from <a href="https://github.com/codetiger/Font23D">https://github.com/codetiger/Font23D</a> and was modified by the Pepr team.  <a href="#a478acb4e2249fe8f6d548e7c850196af">More...</a><br /></td></tr>
<tr class="separator:a478acb4e2249fe8f6d548e7c850196af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add285bc72f4611f6f74811978b877d68"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_font_rasterizer.html#add285bc72f4611f6f74811978b877d68">outlinePostprocess</a> (std::vector&lt; std::vector&lt; <a class="el" href="structpepr3d_1_1_font_rasterizer_1_1_tri.html">Tri</a> &gt;&gt; &amp;trianglesPerLetter) const</td></tr>
<tr class="separator:add285bc72f4611f6f74811978b877d68"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:ade535a9c18d7893a55d0520bee01b162"><td class="memItemLeft" align="right" valign="top"><a id="ade535a9c18d7893a55d0520bee01b162"></a>
static std::vector&lt; p2t::Point * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpepr3d_1_1_font_rasterizer.html#ade535a9c18d7893a55d0520bee01b162">triangulateContour</a> (Vectoriser *vectoriser, int c, float offset)</td></tr>
<tr class="memdesc:ade535a9c18d7893a55d0520bee01b162"><td class="mdescLeft">&#160;</td><td class="mdescRight">The following code originated from <a href="https://github.com/codetiger/Font23D">https://github.com/codetiger/Font23D</a> and was modified by the Pepr team. <br /></td></tr>
<tr class="separator:ade535a9c18d7893a55d0520bee01b162"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a2143778af8792270dc56c21d516f0a39"><td class="memItemLeft" align="right" valign="top"><a id="a2143778af8792270dc56c21d516f0a39"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>mFontFile</b></td></tr>
<tr class="separator:a2143778af8792270dc56c21d516f0a39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86bb6289a6c838b3988fb38b86fab014"><td class="memItemLeft" align="right" valign="top"><a id="a86bb6289a6c838b3988fb38b86fab014"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>mFontLoaded</b> = false</td></tr>
<tr class="separator:a86bb6289a6c838b3988fb38b86fab014"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61aa06d9f214a6298fc13be6f6821f6b"><td class="memItemLeft" align="right" valign="top"><a id="a61aa06d9f214a6298fc13be6f6821f6b"></a>
FT_Library&#160;</td><td class="memItemRight" valign="bottom"><b>mLibrary</b></td></tr>
<tr class="separator:a61aa06d9f214a6298fc13be6f6821f6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a06267b2d5810dc38419f24792d922e79"><td class="memItemLeft" align="right" valign="top"><a id="a06267b2d5810dc38419f24792d922e79"></a>
FT_Face&#160;</td><td class="memItemRight" valign="bottom"><b>mFace</b></td></tr>
<tr class="separator:a06267b2d5810dc38419f24792d922e79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a157983c8ac203ec44d551db0f5d33075"><td class="memItemLeft" align="right" valign="top"><a id="a157983c8ac203ec44d551db0f5d33075"></a>
FT_UInt&#160;</td><td class="memItemRight" valign="bottom"><b>mPrevCharIndex</b> = 0</td></tr>
<tr class="separator:a157983c8ac203ec44d551db0f5d33075"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a614fd5782aec36c0f5afd3c4f45b51ac"><td class="memItemLeft" align="right" valign="top"><a id="a614fd5782aec36c0f5afd3c4f45b51ac"></a>
FT_UInt&#160;</td><td class="memItemRight" valign="bottom"><b>mCurCharIndex</b> = 0</td></tr>
<tr class="separator:a614fd5782aec36c0f5afd3c4f45b51ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fc365e2226ad0555e7fc8e4fa25472d"><td class="memItemLeft" align="right" valign="top"><a id="a1fc365e2226ad0555e7fc8e4fa25472d"></a>
FT_Pos&#160;</td><td class="memItemRight" valign="bottom"><b>mPrev_rsb_delta</b> = 0</td></tr>
<tr class="separator:a1fc365e2226ad0555e7fc8e4fa25472d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Used for triangulating a font outline. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a478acb4e2249fe8f6d548e7c850196af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a478acb4e2249fe8f6d548e7c850196af">&#9670;&nbsp;</a></span>addOneCharacter()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double pepr3d::FontRasterizer::addOneCharacter </td>
          <td>(</td>
          <td class="paramtype">const char&#160;</td>
          <td class="paramname"><em>ch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const size_t&#160;</td>
          <td class="paramname"><em>bezierSteps</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="structpepr3d_1_1_font_rasterizer_1_1_tri.html">Tri</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>outTriangles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The following code originated from <a href="https://github.com/codetiger/Font23D">https://github.com/codetiger/Font23D</a> and was modified by the Pepr team. </p>
<p>Uncomment the following part if you need the outline, not a triangulation Beware, the order of the outlines seems to be random - the first (0) is NOT always the outermost Depends on the font. </p>

</div>
</div>
<a id="add285bc72f4611f6f74811978b877d68"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add285bc72f4611f6f74811978b877d68">&#9670;&nbsp;</a></span>outlinePostprocess()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void pepr3d::FontRasterizer::outlinePostprocess </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; std::vector&lt; <a class="el" href="structpepr3d_1_1_font_rasterizer_1_1_tri.html">Tri</a> &gt;&gt; &amp;&#160;</td>
          <td class="paramname"><em>trianglesPerLetter</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Uncomment the following part if you need the outline, not a triangulation </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Home/MFF/1-Mgr/projekt/pepr3d/src/geometry/<a class="el" href="_font_rasterizer_8h_source.html">FontRasterizer.h</a></li>
<li>D:/Home/MFF/1-Mgr/projekt/pepr3d/src/geometry/FontRasterizer.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacepepr3d.html">pepr3d</a></li><li class="navelem"><a class="el" href="classpepr3d_1_1_font_rasterizer.html">FontRasterizer</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
